Skip to main content
Version: 8.4.10.2

FuturePositionRecordV5

V8 Message Definiton

FuturePositionRecords are live risk records that contain start-of-day positions and all subsequent executions, including executions reported as done away.\nThese records are published by a CoreRiskServer and represent the position and risk markup detail for a single futures contract.\nNew records are published immediately when a position changes and about once per minute if no position has changed.\nNote that all stock, future and option records for a chain are published simultaneously and records for the same chain should have consistent marks.

METADATA

AttributeValue
Topic4740-risk-v5
MLink TokenClientRisk
ProductSRRisk
accessTypeSELECT

Table Definition

FieldTypeKeyDefault ValueComment
fkey_atenum - AssetTypePRI'None'
fkey_tsenum - TickerSrcPRI'None'
fkey_tkVARCHAR(12)PRI''
fkey_yrSMALLINT UNSIGNEDPRI0
fkey_mnTINYINT UNSIGNEDPRI0
fkey_dyTINYINT UNSIGNEDPRI0
accntVARCHAR(16)PRI''
tradeDateDATEPRI'1900-01-01'
riskSessionenum - RiskSessionPRI'Regular'
clientFirmVARCHAR(16)PRI''SR assigned client firm
riskServerCodeVARCHAR(6)''
aggGroupVARCHAR(16)''SR assigned aggregation group
ticker_atenum - AssetType'None'underlying ticker
ticker_tsenum - TickerSrc'None'underlying ticker
ticker_tkVARCHAR(12)''underlying ticker
underliersPerCnINT0number of underlying units per futures contract
underlierTypeenum - UnderlierType'None'
tickValueFLOAT0NLV value of a single tick change in display premium pointValue tickValue tickSize
pointValueFLOAT0NLV value of a single point change in display premium pointValue tickValue tickSize
pointCurrencyenum - Currency'None'
priceFormatenum - PriceFormat'None'price display format code
futPrcDOUBLE0current future price any market session persists if market closedhalted
futBidDOUBLE0current future bid any market session zero if market closedhalted
futAskDOUBLE0current future ask any market session zero if market closedhalted
futMarkDOUBLE0current mark usually mid market freezes at SR CloseMarkTime
futMarkErrCodesVARCHAR(255)'None'
futMarkSourceenum - UMarkSource'None'
futOpnMidMarkDOUBLE0start of day SR mark
futOpnClrMarkDOUBLE0start of day clearing mark usually exchange settlement mark
futOpnPosPrvINT0startofday SR contract position rotated from prior day record
futOpnPosClrINT0startofday CKR contract position supplied by clientclearing firm via clearing position load
futOpnPosINT0start of period contract position effective can be from either CLR or SR
futOpnPosSrcenum - PositionSource'None'start of period position source
cnBotINT0number of contracts bot today
cnSldINT0number of contracts sld today
cnBotTrdINT0number of contracts bot today
cnSldTrdINT0number of contracts sld today
cnBotHdgINT0number of contracts bot today from open pos hedging spdrSourceHedgeTool
cnSldHdgINT0number of contracts sld today from open pos hedging spdrSourceHedgeTool
cnBotTrhINT0number of contracts bot today from open pos hedging spdrSourceTradeHedge
cnSldTrhINT0number of contracts sld today from open pos hedging spdrSourceTradeHedge
cnBotOpnINT0number of contracts bot today from open pos hedging spdrSourceOpenHedge
cnSldOpnINT0number of contracts sld today from open pos hedging spdrSourceOpenHedge
cnOpenedINT0number of contracts opened today
cnClosedINT0number of contracts closed today
futMnyBotDOUBLE0sum of settle cash for all buy executions
futMnySldDOUBLE0sum of settle cash for all sell executions
dayPnlFLOAT0
opnPnlMidMarkFLOAT0
opnPnlClrMarkFLOAT0
betaFLOAT0beta usually beta to SPX see AccountConfigbetaSource if applicable
betaSourceenum - BetaSource'None'
daysSMALLINT0days to expiration
rateFLOAT0global rate to expiration
yearsFLOAT0years to expiration
rhFLOAT0rho dPrc dRate only for STIR futures
veFLOAT0vega dPrc dVol only for VIX futures
ratePrFLOAT0start of period global rate
yearsPrFLOAT0start of period years to expiration
marginUDnFLOAT0Aggregate RiskSlide uPrc dn
marginUUpFLOAT0Aggregate RiskSlide uPrc up
numExecutionsINT0number of included SpdrParentExecution records
maxExecDttmDATETIME(6)'1900-01-01 00:00:00.000000'maximum activity dttm of execution records included in this future risk record
timestampDATETIME(6)'1900-01-01 00:00:00.000000'

PRIMARY KEY DEFINITION (Unique)

FieldSequence
fkey_tk1
fkey_yr2
fkey_mn3
fkey_dy4
fkey_at5
fkey_ts6
accnt7
tradeDate8
riskSession9
clientFirm10

CREATE TABLE EXAMPLE QUERY

CREATE TABLE `SRRisk`.`MsgFuturePositionRecordV5` (
`fkey_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None',
`fkey_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None',
`fkey_tk` VARCHAR(12) NOT NULL DEFAULT '',
`fkey_yr` SMALLINT UNSIGNED NOT NULL DEFAULT 0,
`fkey_mn` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`fkey_dy` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`accnt` VARCHAR(16) NOT NULL DEFAULT '',
`tradeDate` DATE NOT NULL DEFAULT '1900-01-01',
`riskSession` ENUM('Regular','PostClose') NOT NULL DEFAULT 'Regular',
`clientFirm` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'SR assigned client firm',
`riskServerCode` VARCHAR(6) NOT NULL DEFAULT '',
`aggGroup` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'SR assigned aggregation group',
`ticker_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT 'underlying ticker',
`ticker_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'underlying ticker',
`ticker_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'underlying ticker',
`underliersPerCn` INT NOT NULL DEFAULT 0 COMMENT 'number of underlying units per futures contract',
`underlierType` ENUM('None','Equity','Other','FX') NOT NULL DEFAULT 'None',
`tickValue` FLOAT NOT NULL DEFAULT 0 COMMENT '$NLV value of a single tick change in display premium (pointValue = tickValue / tickSize)',
`pointValue` FLOAT NOT NULL DEFAULT 0 COMMENT '$NLV value of a single point change in display premium (pointValue = tickValue / tickSize)',
`pointCurrency` ENUM('None','AUD','BRL','CAD','CHF','CNH','CNY','EUR','GBP','JPY','KRW','MXN','MYR','NOK','NZD','SEK','TRY','USD','USDCents','CZK','ZAR','HUF','USX','GBX') NOT NULL DEFAULT 'None',
`priceFormat` ENUM('None','N0','N1','N2','N3','N4','N5','N6','N7','F4','F8','Q8','F16','F32','H32','Q32','F64','H64','FullPenny','PartPenny','PartNickle','EQT','V1','V2','V3','V4','V5','V6','V7','V8','V9','V10','V11','V12','V13','V14','V15','A0','A1','A2','A3','A4','A5','A6','A7','E32') NOT NULL DEFAULT 'None' COMMENT 'price display format code',
`futPrc` DOUBLE NOT NULL DEFAULT 0 COMMENT 'current future price (any market session) (persists if market closed/halted)',
`futBid` DOUBLE NOT NULL DEFAULT 0 COMMENT 'current future bid (any market session) (zero if market closed/halted)',
`futAsk` DOUBLE NOT NULL DEFAULT 0 COMMENT 'current future ask (any market session) (zero if market closed/halted)',
`futMark` DOUBLE NOT NULL DEFAULT 0 COMMENT 'current mark (usually mid market) (freezes at SR CloseMarkTime)',
`futMarkErrCodes` VARCHAR(255) NOT NULL DEFAULT 'None',
`futMarkSource` ENUM('None','OpenMark','CloseMark','Print','LiveQuote','QuoteBound') NOT NULL DEFAULT 'None',
`futOpnMidMark` DOUBLE NOT NULL DEFAULT 0 COMMENT 'start of day SR mark',
`futOpnClrMark` DOUBLE NOT NULL DEFAULT 0 COMMENT 'start of day clearing mark (usually exchange settlement mark)',
`futOpnPosPrv` INT NOT NULL DEFAULT 0 COMMENT 'start-of-day SR contract position (rotated from prior day record)',
`futOpnPosClr` INT NOT NULL DEFAULT 0 COMMENT 'start-of-day CKR contract position (supplied by client/clearing firm via clearing position load)',
`futOpnPos` INT NOT NULL DEFAULT 0 COMMENT 'start of period contract position (effective; can be from either CLR or SR)',
`futOpnPosSrc` ENUM('None','Zero','SR','CLR') NOT NULL DEFAULT 'None' COMMENT 'start of period position source',
`cnBot` INT NOT NULL DEFAULT 0 COMMENT 'number of contracts bot today',
`cnSld` INT NOT NULL DEFAULT 0 COMMENT 'number of contracts sld today',
`cnBotTrd` INT NOT NULL DEFAULT 0 COMMENT 'number of contracts bot today',
`cnSldTrd` INT NOT NULL DEFAULT 0 COMMENT 'number of contracts sld today',
`cnBotHdg` INT NOT NULL DEFAULT 0 COMMENT 'number of contracts bot today from open pos hedging (spdrSource=HedgeTool)',
`cnSldHdg` INT NOT NULL DEFAULT 0 COMMENT 'number of contracts sld today from open pos hedging (spdrSource=HedgeTool)',
`cnBotTrh` INT NOT NULL DEFAULT 0 COMMENT 'number of contracts bot today from open pos hedging (spdrSource=TradeHedge)',
`cnSldTrh` INT NOT NULL DEFAULT 0 COMMENT 'number of contracts sld today from open pos hedging (spdrSource=TradeHedge)',
`cnBotOpn` INT NOT NULL DEFAULT 0 COMMENT 'number of contracts bot today from open pos hedging (spdrSource=OpenHedge)',
`cnSldOpn` INT NOT NULL DEFAULT 0 COMMENT 'number of contracts sld today from open pos hedging (spdrSource=OpenHedge)',
`cnOpened` INT NOT NULL DEFAULT 0 COMMENT 'number of contracts opened today',
`cnClosed` INT NOT NULL DEFAULT 0 COMMENT 'number of contracts closed today',
`futMnyBot` DOUBLE NOT NULL DEFAULT 0 COMMENT 'sum of settle cash for all buy executions',
`futMnySld` DOUBLE NOT NULL DEFAULT 0 COMMENT 'sum of settle cash for all sell executions',
`dayPnl` FLOAT NOT NULL DEFAULT 0,
`opnPnlMidMark` FLOAT NOT NULL DEFAULT 0,
`opnPnlClrMark` FLOAT NOT NULL DEFAULT 0,
`beta` FLOAT NOT NULL DEFAULT 0 COMMENT 'beta (usually beta to SPX; see AccountConfig.betaSource) (if applicable)',
`betaSource` ENUM('None','betaSPX','betaQQQ','betaIWM','clientBeta') NOT NULL DEFAULT 'None',
`days` SMALLINT NOT NULL DEFAULT 0 COMMENT 'days to expiration',
`rate` FLOAT NOT NULL DEFAULT 0 COMMENT 'global rate to expiration',
`years` FLOAT NOT NULL DEFAULT 0 COMMENT 'years to expiration',
`rh` FLOAT NOT NULL DEFAULT 0 COMMENT 'rho; (dPrc / dRate) - only for STIR futures',
`ve` FLOAT NOT NULL DEFAULT 0 COMMENT 'vega; (dPrc / dVol) - only for VIX futures',
`ratePr` FLOAT NOT NULL DEFAULT 0 COMMENT 'start of period global rate',
`yearsPr` FLOAT NOT NULL DEFAULT 0 COMMENT 'start of period years to expiration',
`marginUDn` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate RiskSlide: uPrc dn',
`marginUUp` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate RiskSlide: uPrc up',
`numExecutions` INT NOT NULL DEFAULT 0 COMMENT 'number of included SpdrParentExecution records',
`maxExecDttm` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'maximum activity dttm of execution records included in this future risk record',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
PRIMARY KEY USING HASH (`fkey_tk`,`fkey_yr`,`fkey_mn`,`fkey_dy`,`fkey_at`,`fkey_ts`,`accnt`,`tradeDate`,`riskSession`,`clientFirm`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='FuturePositionRecords are live risk records that contain start-of-day positions and all subsequent executions, including executions reported as done away.\nThese records are published by a CoreRiskServer and represent the position and risk markup detail for a single futures contract.\nNew records are published immediately when a position changes and about once per minute if no position has changed.\nNote that all stock, future and option records for a chain are published simultaneously and records for the same chain should have consistent marks.';

SELECT TABLE EXAMPLE QUERY

SELECT
`fkey_at`,
`fkey_ts`,
`fkey_tk`,
`fkey_yr`,
`fkey_mn`,
`fkey_dy`,
`accnt`,
`tradeDate`,
`riskSession`,
`clientFirm`,
`riskServerCode`,
`aggGroup`,
`ticker_at`,
`ticker_ts`,
`ticker_tk`,
`underliersPerCn`,
`underlierType`,
`tickValue`,
`pointValue`,
`pointCurrency`,
`priceFormat`,
`futPrc`,
`futBid`,
`futAsk`,
`futMark`,
`futMarkErrCodes`,
`futMarkSource`,
`futOpnMidMark`,
`futOpnClrMark`,
`futOpnPosPrv`,
`futOpnPosClr`,
`futOpnPos`,
`futOpnPosSrc`,
`cnBot`,
`cnSld`,
`cnBotTrd`,
`cnSldTrd`,
`cnBotHdg`,
`cnSldHdg`,
`cnBotTrh`,
`cnSldTrh`,
`cnBotOpn`,
`cnSldOpn`,
`cnOpened`,
`cnClosed`,
`futMnyBot`,
`futMnySld`,
`dayPnl`,
`opnPnlMidMark`,
`opnPnlClrMark`,
`beta`,
`betaSource`,
`days`,
`rate`,
`years`,
`rh`,
`ve`,
`ratePr`,
`yearsPr`,
`marginUDn`,
`marginUUp`,
`numExecutions`,
`maxExecDttm`,
`timestamp`
FROM `SRRisk`.`MsgFuturePositionRecordV5`
WHERE
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`fkey_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`fkey_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`fkey_tk` = 'Example_fkey_tk'
AND
/* Replace with a SMALLINT UNSIGNED */
`fkey_yr` = 123
AND
/* Replace with a TINYINT UNSIGNED */
`fkey_mn` = 1
AND
/* Replace with a TINYINT UNSIGNED */
`fkey_dy` = 1
AND
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a DATE */
`tradeDate` = '2022-01-01'
AND
/* Replace with a ENUM('Regular','PostClose') */
`riskSession` = 'Regular'
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';

Doc Columns Query

SELECT * FROM SRRisk.doccolumns WHERE TABLE_NAME='FuturePositionRecordV5' ORDER BY ordinal_position ASC;